package java101;

public class PrimeNumber {

	public static void main(String[] args) {
		
		boolean prime = true;

		for (int i = 1; i < 1000; i += 2){
			
			for (int a = 2; a < Math.sqrt(i); a++){
				if (i%a == 0)
					prime = false;
					
				if (prime == true) 
				System.out.println(i + " is prime.");
				
				else {
					System.out.println("oops");
				}
//		int a = 0;
//		int i;
//				for (i = 1; i < 1000; i += 2)
//					do {
//						a++;
//						} while (a <= Math.sqrt(i) && i%a != 0);
					
		
	}

}
}
}
